//路由的配置就写在这里
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

//导入页面  @代表src文件夹
import login from '@/views/login/login.vue'
import layout from '@/views/layout/index.vue'

const router = new VueRouter({
  routes: [
    {path: '/login', component: login},
    {path: '/layout', component: layout},
    //重定向
    { path: '/', redirect: '/login' }
  ]
})

//ES6中的默认导出
export default router